//返回顶部数据和钩子

export default {
  data() {
    return {
      scTop: null
    }
  },
  mounted () {
    var boxHome = this.$refs.viewhome
    boxHome.addEventListener('scroll',()=>{
      this.scTop = this.$refs.viewhome.scrollTop
    })
  },
  methods: {
    backTop(val) {
      this.$refs.viewhome.scrollTop = val
    }
  },
}